﻿const db = require('../data/database');

const quotes = [
    {text: 'Learning never stops',},
    {text: 'Never stops'},
    {text: 'anything is possible'},
    {text: 'just do it'},
    {text: 'beat yourself'}
]

class Quote {

    static async getRandomQuote() {
        //const quotes = await db.getDb().collection('quotes').find().toArray();
        const randomQuoteIndex = Math.floor(Math.random() * quotes.length);

        const randomQuote = quotes[randomQuoteIndex];
        return randomQuote.text;
    }
}

module.exports = Quote;